import request from '@/utils/request'

/**
 * 查询所有分类
 * @returns
 */
export const getCategories = () =>
    request<any, string[]>({
        url: '/api/tabs',
    })

/**
* 根据分类查找该分类下的品牌列表
* @param category
* @returns
*/
export const getBrandsByCategory = (category: string) =>
    request<any, Brand[]>({
        url: '/api/tab/' + category,
        params: {
            category,
        },
    })

/**
* 根据分类与品牌查询商品列表数据
* @param category
* @param brand
* @returns
*/
export const getListByBrandAndCategory = (id: any) =>
    request({
        url: `/api/list/${id}`
        
    })